Skip to content

Get raw field labels from app grids and tables#2426

Merged
labkey-tchad merged 26 commits intodevelopfrom
fb_doubleSpaces
May 2, 2025
Merged

Get raw field labels from app grids and tables#2426
labkey-tchad merged 26 commits intodevelopfrom
fb_doubleSpaces

Conversation

@labkey-tchad
Copy link
Copy Markdown
Member

Rationale

[Story] (Phase 2)
The browser modifies whitespace when rendering text (removing duplicate spaces and trimming leading/trailing whitespace). As such, we can't trust it to accurately represent field labels. Currently, we use WebElement.getText to extract field labels from the page which might not match a field's actual label. We should be able to extract accurate labels from the page via the testContext property or by inspecting HTML text nodes. This will allow us to remove the multi-space restriction from TestDataGenerator.randomName and FieldDefinition.labelFromName.

Related Pull Requests

Changes

  • Get raw field labels from app grids and tables

Copy link
Copy Markdown
Contributor

@labkey-danield labkey-danield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I marked this as approved before realizing that there are several failures in LKSM and Biologics for this branch.
Can you get a cleaner run first?

@labkey-tchad
Copy link
Copy Markdown
Member Author

I marked this as approved before realizing that there are several failures in LKSM and Biologics for this branch. Can you get a cleaner run first?

Yeah, I flipped the lims PR to draft when I noticed the failures. I made a temporary change that ensures there is a double-space in every random field name and it uncovered some places that still need updates.

Comment thread src/org/labkey/test/util/DeferredErrorCollector.java Outdated
Comment thread src/org/labkey/test/util/DeferredErrorCollector.java Outdated
Comment thread src/org/labkey/test/util/TestDataGenerator.java Outdated
@labkey-tchad labkey-tchad merged commit da76e8d into develop May 2, 2025
1 of 2 checks passed
@labkey-tchad labkey-tchad deleted the fb_doubleSpaces branch May 2, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants